Routing devices within a network, often referred to as routers, maintain routing information that describe available routes through the network. Upon receiving an incoming packet, the router examines information within the packet and forwards the packet in accordance with the routing information. In order to maintain an accurate representation of the network, routers exchange routing information in accordance with one or more defined routing protocol, such as link-state routing protocols of Interior Gateway Protocol (IGP). In link-state routing, the routers typically exchange information related to available interfaces, metrics and other variables associated with links between the routers. This allows each of the routers to construct its own topology or map of the network. Some examples of link-state routing protocols include the Open Shortest Path First (OSPF) protocol and the Intermediate-System to Intermediate System (IS-IS) protocol.
Packet-based networks increasingly utilize label switching protocols for traffic engineering and other purposes. Multi-Protocol Label Switching (MPLS) is a mechanism used to engineer traffic patterns within Internet Protocol (IP) networks according to the routing information maintained by the routers in the networks. By utilizing MPLS protocols, such as the Label Distribution Protocol (LDP) or the Resource Reservation Protocol with Traffic Engineering extensions (RSVP-TE), a source device can request a path through a network to a destination device, i.e., a Label Switched Path (LSP). An LSP defines a distinct path through the network to carry MPLS packets from a source device, commonly known as an ingress router, to a destination device, commonly known as an egress router, of the LSP. Ingress and egress routers are referred to generally as label edge routers (LERs), and intermediate routers along the LSP that support MPLS are referred to generally as label switching routers (LSRs). A short label associated with a particular LSP is affixed to packets that travel through the network via the LSP. LSRs along the path cooperatively perform MPLS operations to forward the MPLS packets along the established path.
A set of packets to be forwarded along the LSP is referred to as a forwarding equivalence class (FEC). A plurality of FECs may exist for each LSP, although there may, in some examples, be only one active LSP for any given FEC. Typically, a FEC definition includes the IP address of the egress LER of the LSP. In general, each router along the LSP maintains a context that associates a FEC with an incoming label and an outgoing label. The ingress LER uses routing information, propagated from the egress LER, to determine the LSP, assign labels for the LSP, and affix a label to each packet of the FEC. The LSRs use MPLS protocols to receive MPLS label mappings from downstream LSRs and to advertise MPLS label mappings to upstream LSRs. When an LSR receives an MPLS packet from an upstream router, the LSR performs a lookup in the context and swaps the MPLS label according to the information in its forwarding table, and forwards the packet to the appropriate downstream LSR or LER. The egress LER removes the label from the packet and forwards the packet to its destination in accordance with non-label based packet forwarding techniques.